package cn.wgx.module.mind.entity;

import lombok.Data;

/**
 * srt 字幕
 */
@Data
public class Srt {

    public Srt(Integer id, Long startTime, Long endTime, String content){
        this.id = id;
        this.startTime = startTime;
        this.endTime = endTime;
        this.content = content;
    }

    private Integer id;

    private Long startTime;

    private Long endTime;
    //字幕正文
    private String content;
    //字幕位置
    private SrtPosition position = SrtPosition.p2;
    //字体大小
    private Integer fontSize = 12;
    //字体
    private String face = "楷体";
    //颜色,默认白色
    private String color = "#ffffff";
    //加粗
    private boolean bold = false;
    //斜体
    private boolean italics = false;
    //下划线
    private boolean underline = false;

    //字幕位置,按屏幕分为9个区域,对应如下
    public enum SrtPosition  {

        p7("{\\an7}"),p8("{\\an8}"),p9("{\\an9}"),
        p4("{\\an4}"),p5("{\\an5}"),p6("{\\an6}"),
        p1("{\\an1}"),p2("{\\an2}"),p3("{\\an3}");

        private String a;

        SrtPosition(String position){
            this.a=position;
        }
    }
}
